package org.dromara.netbar.domain.vo;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import org.dromara.netbar.domain.NetbarCouponMember;
import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
import cn.idev.excel.annotation.ExcelProperty;
import org.dromara.common.excel.annotation.ExcelDictFormat;
import org.dromara.common.excel.convert.ExcelDictConvert;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;
import java.util.Date;



/**
 * 会员-卡券关联视图对象 netbar_coupon_member
 *
 * @author Lion Li
 * @date 2025-07-15
 */
@Data
@ExcelIgnoreUnannotated
@AutoMapper(target = NetbarCouponMember.class)
@JsonInclude(value = JsonInclude.Include.NON_NULL)
public class NetbarCouponMemberVo implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 卡券发放记录唯一ID
     */
    @ExcelProperty(value = "卡券发放记录唯一ID")
    private Long couponMemberId;

    /**
     * 卡券关联ID
     */
    @ExcelProperty(value = "卡券关联ID")
    private Long couponId;

    /**
     * 会员关联ID
     */
    @ExcelProperty(value = "会员关联ID")
    private Long memberId;

    /**
     * 是否已使用（0未使用 1已使用）
     */
    @ExcelProperty(value = "是否已使用", converter = ExcelDictConvert.class)
    @ExcelDictFormat(readConverterExp = "0=未使用,1=已使用")
    private String status;

    /**
     * 使用时间
     */
    @ExcelProperty(value = "使用时间")
    private Date useTime;

    /**
     * 卡券数量（某个接口返回持有该卡券数量）
     */
    private Long couponNumber;

    private NetbarCouponVo coupon;

    /**
     * 是否可用
     */
    private boolean isAvailable;
}
